home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Trusted Irix /B 4.0.4
/
Trusted-Irix B-4.0.1.iso
/
dist
/
eoe1.idb
/
usr
/
include
/
sys
/
IP6.h.z
/
IP6.h
Wrap
C/C++ Source or Header
|
1992-04-03
|
14KB
|
364 lines
/**************************************************************************
* *
* Copyright (C) 1987, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
/*
* ip6.h -- cpu board specific defines for ip6
*/
#ifndef __SYS_IP6_H__
#define __SYS_IP6_H__
#ident "$Revision: 1.48 $"
/*OLSON: next 9 may be able to be removed */
#define REFRESH_ADDR 0x1fb80004
#define ACR_OFFSET 0x40 /* offset to ACR register */
#define CTUR_OFFSET 0x60 /* offset to CTUR register */
#define CTLR_OFFSET 0x70 /* offset to CTLR register */
#define OPCR_OFFSET 0xd0 /* offset to OPCR register */
#define RFU_RATE 0x0 /* Upper byte of refresh rate */
#define RFL_RATE 0x0e /* Lower byte of refresh rate */
#define ACR_BITS 0x04 /* bits for ACR register: */
#define OPCR_BITS 0xe0 /* bits for OPCR register: */
#define SBE_ADDR 0x1fa40000 /* system bus error address (w)*/
#define CPU_CONFIG 0x1f880002 /* Control and status register (h) */
/*
** The led bits use the top bit to indicate if the FPC is installed.
*/
#define CONFIG_LEDS 0x001f /* LED bits on IP4, not used on IP6 */
#define CONFIG_S01 0x0040 /* Enable drive for serial ports 0,1 */
#define CONFIG_S23 0x0080 /* Enable drive for serial ports 2,3 */
#define CONFIG_MAIL 0x0100 /* Enable mailbox interrupts */
#define CONFIG_INIT 0x0200 /* Drive VME SYSRESET (will reset CPU)*/
#define CONFIG_ENPAR 0x0400 /* Enable parity */
#define CONFIG_SLAVE 0x0800 /* Allow Slave accesses to board */
#define CONFIG_ARB 0x1000 /* Enable VME arbiter function */
#define CONFIG_BADPAR 0x2000 /* Write bad parity */
#define CONFIG_DOG 0x4000 /* Enable watchdog timeout */
#define CONFIG_AUX2 0x8000 /* Unused */
/*
* Interrupt enable bits
* (note: bits set to 1 enable the corresponding level interrupt
*/
#define SR_ILEVL8 0x00000000 /* mask level 8 */
#define SR_ILEVL7 0x00008000 /* mask level 7 */
#define SR_ILEVL6 0x0000c000 /* mask level 6 */
#define SR_ILEVL5 0x0000e800 /* mask level 5 */
#define SR_ILEVL4 0x0000f800 /* mask level 4 */
#define SR_ILEVL3 0x0000f800 /* mask level 3 */
#define SR_ILEVL2 0x0000fc00 /* mask level 2 */
#define SR_ILEVL1 0x0000fe00 /* mask level 1 */
#define SR_ILEVL0 0x0000ff00 /* mask level 0 */
#define SR_LCLMASK 0xff000000
#define SR_LCLMASK_POS 24
#define LIO_IMASK8 0x00000000 /* Local interrupt mask levels */
#define LIO_IMASK7 0x00000000
#define LIO_IMASK6 0x00000000
#define LIO_IMASK5 0x00000004 /* Only allow retrace */
#define LIO_IMASK4 0x00000004
#define LIO_IMASK3 0x000000ff /* Allow everything */
#define LIO_IMASK2 0x000000ff
#define LIO_IMASK1 0x000000ff
#define LIO_IMASK0 0x000000ff
#define LIO_IMP (~LIO_VR & 0xff) << SR_LCLMASK_POS
#define MEM_CONFIG_ADDR 0x1f800000
#define MCF_4MRAM 0x10
#define MCF_MEMSIZE 0x1f
#define MCF_STALL1 0x40 /* reduces the CAS pulse on reads */
/* Local I/O Interrupt Status Register */
#define LIO_ISR_ADDR 0x1f980002 /* Local IO interrupt status (h) */
#define LIO_D0 0x001 /* Duart 0 interrupt */
#define LIO_D1 0x002 /* Duart 1 interrupt */
#define LIO_VR 0x004 /* Vertical retrace interrupt */
#define LIO_CENTR 0x008 /* Centronics Printer Interrupt */
#define LIO_SCSI 0x010 /* SCSI interrupt */
#define LIO_ENET 0x020 /* Ethernet interrupt */
#define LIO_GE 0x040 /* GE interrupt */
#define LIO_FIFO 0x080 /* FIFO full interrupt */
#define LIO_AC 0x100 /* VME AC fail interrupt */
#define LIO_VRSTAT 0x200 /* Vert retrace status: no interrupt */
/* Local I/O Interrupt Mask Register */
#define LIO_MASK_ADDR 0xbf98000b /* Local IO mask (b) */
#define LIO_D0_MASK 0x001 /* Duart 0 interrupt mask */
#define LIO_D1_MASK 0x002 /* Duart 1 interrupt mask */
#define LIO_VR_MASK 0x004 /* Vertical retrace interrupt mask */
#define LIO_CENTR_MASK 0x008 /* Centronics printer interrupt mask */
#define LIO_SCSI_MASK 0x010 /* SCSI interrupt mask */
#define LIO_ENET_MASK 0x020 /* Ethernet interrupt mask */
#define LIO_GE_MASK 0x040 /* GE interrupt mask */
#define LIO_FIFO_MASK 0x080 /* FIFO full interrupt mask */
/* System ID PROM / Coprocessor Present Reg */
#define SYSID 0x1f800001 /* SYSID PROM address (b) */
/* The sysid register also contains system status information on IP6 */
#define SID_SERDATA 0x01 /* serial memory data output state */
#define SID_FPPRES 0x02 /* floating point processor present */
#define SID_SERCLK 0x04 /* serial memory clock */
#define SID_GDMAERR 0x08 /* error in graphics DMA */
#define SID_GDMAEN 0x10 /* graphics DMA busy */
#define SID_GDMARDY 0x20 /* asserted at end of graphics DMA */
#define SID_GDMARST 0x40 /* asserted in reset of graphics DMA */
#define SID_VMERMW 0x80 /* asserted in vme read-mod-write */
/*
* In addition to RMW_TOGGLE (shared w/IP4 in prom.h), IP6 has strobes
* to turn on and off the following control bits.
*/
#define GDMA_START_PHYS 0x1fa60008 /* start graphics DMA (b) */
#define GDMA_STOP_PHYS 0x1fa6000c /* stop graphics DMA (b) */
#define GDMA_RESET_PHYS 0x1fa60010 /* reset graphics DMA (b) */
#define GDMA_UNRES_PHYS 0x1fa60014 /* unreset graphics DMA (b) */
#define SET_SERCLK 0x1fa60018 /* set serial clock (b) */
#define RESET_SERCLK 0x1fa6001c /* reset serial clock (b) */
#define VR_RESET_PHYS 0x1fac0000 /* reset vert retrace interrupt (b) */
#define RELOAD_BURST 0x1fa60020 /* reload gfx DMA burst/delay reg (b) */
#define RAS_DECODER 0x1fa60024 /* address to turn RAS decoder on */
#define INC_CHANNEL 0x1fa60028 /* increment channel (b) */
#define INC_REFRESH 0x1fa6002c /* increment refresh (b) */
#define INC_TIMER 0x1fa60030 /* increment timer (b) */
#define INC_DABR 0x1fa60034 /* increment DABR (b) */
#define INC_BURST 0x1fa60038 /* increment burst (b) */
/* CPU aux control register */
#define CPU_AUX_CONTROL 0x1f8e0000 /* CPU aux control register (b) */
#define GFX_RESET 0x80 /* Reset graphics subsystem */
#define CONSOLE_CS 0x20 /* EEPROM (nvram) chip select */
#define CONSOLE_LED 0x10 /* Console led */
#define NVRAM_PRE 0x10 /* EEPROM (nvram) PRE pin signal */
#define CPU_LED 0x0f /* CPU leds */
#define LED_REG CPU_AUX_CONTROL
#define LED_MASK CPU_LED /* led bits */
#define LED_HEART 0x01 /* 1 HZ Heartbeat */
#define LED_IDLE 0x02 /* off when cpu is idle */
#define LED_GFX 0x04
#define LED_CP 0x08 /* on when fpu is present */
/*
* Graphics Channel registers and register bits
*/
#define GDMA_DABR_PHYS 0x1fa40008 /* Descriptor array base reg (w) */
#define GDMA_BUFADR_PHYS 0x1fa4000c /* Buffer Address reg (w) */
#define GDMA_BUFLEN_PHYS 0x1fa40012 /* Buffer Length reg (h) */
#define GDMA_BURST_PHYS 0x1fa40010 /* Burst/Delay reg (h) */
/* These bits are in GDMA_BUFLEN_PHYS reg above */
#define GDMA_HTOG 0x2000 /* DMA Direction bit: 1 = Host to Gfx */
#define GDMA_GTOH 0x0000 /* DMA Direction bit: 0 = Gfx to Host */
#define GDMA_PAUSE 0x4000 /* Pause after channel load (diag) */
#define GDMA_LAST 0x8000 /* Marks last desc array entry */
/* Graphics DMA burst & delay periods = ~(register_value) * 100ns */
/* Gets loaded into GDMA_BURST_PHYS reg above
* These values reflect RE1 hardware requirements, other RE's are
* programmed from the master.d file.
*/
#define GDMA_BURST_DEFAULT 0x00 /* burst period = 25.5us */
#define GDMA_DELAY_DEFAULT 0xec /* bus grant period = 2us */
/* Cause a read/modify/write cycle to occur with the next read and write */
#define VME_RMW_ADDR 0xbfa60000 /* VME RMW toggle */
/* Parity Errors */
#define PAR_ERR_ADDR 0x1faa0005 /* Parity error register (b) */
#define PAR_LAN 0x01 /* LAN generated error */
#define PAR_DMA 0x02 /* DMA generated error */
#define PAR_CPU 0x04 /* CPU generated error */
#define PAR_VME 0x08 /* VME generated error */
#define PAR_B3 0x10 /* Parity error in byte 3 */
#define PAR_B2 0x20 /* Parity error in byte 2 */
#define PAR_B1 0x40 /* Parity error in byte 1 */
#define PAR_B0 0x80 /* Parity error in byte 0 */
#define PAR_CL_LAN_ADDR 0x1faa0000 /* Clear LAN Access bit (b) */
#define PAR_CL_DMA 0x1faa0001 /* Clear DMA Access bit (b) */
#define PAR_CL_CPU 0x1faa0002 /* Clear CPU Access bit (b) */
#define PAR_CL_VME 0x1faa0003 /* Clear VME Access bit (b) */
/* SCSI Control */
#define NMAPREG 256 /* how many pages can be mapped for DMA */
#define SCSI_INIT_ADDR 0xbfa80004 /* Activate master reset on chip */
#define SCSI_RDY_ADDR 0xbfa80000 /* Deactivate master reset on chip */
#define SCSI0_ADDR 0xbfb00001 /* SCSI WD33C93 address register */
#define SCSI1_ADDR 0xbfb00101 /* SCSI WD33C93 data register */
#define SCSI_DMALO_ADDR 0xbf900002 /* Low address register (h)*/
#define SCSI_DMAHI_ADDR 0xbf920002 /* High address register array (16h)*/
#define SCSI_DMAHI_ADDR 0xbf920002 /* High address register array (16h)*/
#define SCSI_FLUSH_ADDR 0xbf940000 /* DMA flush bytes to memory */
#define SCSI_TO_MEM 0x80 /* transfer in */
#define IOC2CONFIG 0x1fa80008 /* configuration register for Rev 2 IOC
chip; all bits RO, except BURST, NOSYNC, and HIWAT. Probing this
address on IOC rev 1 gets a bus error. The ID bits are 0 for Rev 2.
HIWAT:0-3 ID:4-5 NOSYNC:6 BURST:7 COUNT:8-14 RESERV:15
SCP:16-21 RESERV:22-27 IOP:28-31 */
/* Clock and timer addresses */
#ifdef LANGUAGE_ASSEMBLY /* used by some standalone assembler routines */
#define PT_CLOCK_ADDR PHYS_TO_K1(0x1fb40000)
#else
#define PT_CLOCK_ADDR (struct pt_clock *)PHYS_TO_K1(0x1fb40000)
#endif
#define TIM0_ACK_ADDR (char *)PHYS_TO_K1(0x1fa20000)
#define TIM1_ACK_ADDR (char *)PHYS_TO_K1(0x1fa00000)
#ifdef LANGUAGE_C
#define RT_CLOCK_ADDR (struct dp8573_clk *)PHYS_TO_K1(0x1fbc0000)
#else
#define RT_CLOCK_ADDR PHYS_TO_K1(0x1fbc0000)
#endif
/*
* VIP10 location monitor related defines
*/
#define LM_PRIO 7 /* VME interrupt prio usurped by lm */
#define LM_IC 0x1F8C0000 /* Interrupt clear address*/
/*
* VMEbus related defines
*/
/*
* VME interrupt control registers
*/
#define VME_IMR 0x1f84000b /* interrupt mask */
#define VME_ISR 0x1f840003 /* interrupt status */
#define VME_IACK 0x1df00002 /* interrupt acknowledge */
/*
* VME I/O space defines
*/
#define VME_A16NPBASE 0x1d100000 /* a16 non-privileged address sp */
#define VME_A16NPSIZE 0x00010000 /* size */
#define VME_A16SBASE 0x1d000000 /* a16 supervisor address sp */
#define VME_A16SSIZE 0x00010000 /* size */
#define VME_A24NPBASE 0x1e000000 /* a24 non-privileged address sp */
#define VME_A24NPSIZE 0x01000000 /* size */
#define VME_A24SBASE 0x1c000000 /* a24 supervisor address sp */
#define VME_A24SSIZE 0x01000000 /* size */
#define VME_A32NPBASE 0x10000000 /* a32 non-privileged address sp */
#define VME_A32NPSIZE 0x0c000000 /* size */
#define VME_A32SBASE 0x0 /* a32 supervisor address sp */
#define VME_A32SSIZE 0x0 /* size */
#define vme_adapter(addr) 0 /* only 1 VME adapter */
#ifdef LANGUAGE_C
/*
* Graphics DMA channel descriptor array element.
*/
typedef struct gdmada {
long *bufaddr;
long dmactl;
} gdmada_t;
/*
** local interrtupt table vector numbers for use with setlclvector()
*/
#define VECTOR_GFX_FIFO 7
#define VECTOR_GFX_RETRACE 2
#define VECTOR_GFX_GE 6
typedef struct scuzzy {
u_char *d_addr; /* address register */
u_char *d_data; /* data register */
unsigned char d_initflags; /* initial flags for d_flags */
unsigned char d_clock; /* value for clock register on WD chip */
} scuzzy_t;
#if defined(STANDALONE)
typedef struct int_tbl {
int (*i_hndlr)();
int i_arg;
} int_tbl_t;
extern int_tbl_t lclvec_tbl[];
#endif
#endif /* LANGUAGE_C */
/* CPU aux control register */
#define SERCLK 0x40 /* serial clock signal */
#define SERDATA 0x01 /* EEPROM (nvram) serial input bit */
#define FPU_PRESENT 0x02 /* FP coprocessor present */
#define BSR_SERDATA 0x0100 /* Serial memory data input */
#define BSR_INIT 0x0200 /* Drive VME SYSRESET (will reset CPU)*/
#define BSR_ENPAR 0x0400 /* Enable parity */
#define BSR_SLAVE 0x0800 /* Allow Slave accesses to board */
#define BSR_ARB 0x1000 /* Enable VME arbiter function */
#define BSR_BADPAR 0x2000 /* Write bad parity */
#define BSR_DOG 0x4000 /* Enable watchdog timeout */
#define BSR_FPER 0x8000 /* Fast peripheral cycle */
#define MCF_TIMERDIS 0x20 /* reduces the peripheral r/w strobe */
#define MCF_FMEM 0x40 /* reduces the CAS pulse on reads */
#define MCF_REFDIS 0x80 /* disable memory refresh */
#define PAR_CL_GDMA 0x1faa0000 /* Clear GDMA parity error bit (b) */
/* Control opcode for nonvolatile ram on IP6 (should be put somewhere else) */
#define SER_READ 0xc000 /* serial memory read */
#define SER_WEN 0x9800 /* write enable before prog modes */
#define SER_WRITE 0xa000 /* serial memory write */
#define SER_WDS 0x8000 /* disable all programming */
#define SER_WRALL 0x8800 /* write all registers */
#define SER_PRCLEAR 0xffff /* clear protect register */
#define LCA_READBACK 0x1f8c0000 /* LCA array readback trigger (b) */
#define REFRESH_TIMER 0x1fa40004 /* Refresh timer/counter (w) */
#if defined(STANDALONE) || defined(LOCORE) || defined(PROM)
#include <sys/IP6nvram.h> /* NVRAM stuff for IP6 standalone */
#endif
/* Address definitions */
#define SYMMON_STACK 0xa0003000
#define PROM_STACK 0xa0400000
#define PROM_CHILD_STACK 0xa037fffc /* SASH's stack is 16k max. */
#define RESTART_ADDR 0xa0000400
/* Size definitions */
#define SYMMON_PDASIZE 512 /* size per CPU */
#define dcache_wb(X,Y)
#define dcache_wbinval(X,Y) dcache_inval(X,Y)
#endif /* __SYS_IP6_H__ */